package snippets.cse524.activeDates.evaluation;

public final class LifespanEvaluator {
	public static double squaredError(Lifespan real, Lifespan estimate) {
		return Math.pow(real.getBeginYear() - estimate.getBeginYear(), 2)
				+ Math.pow(real.getEndYear() - estimate.getEndYear(), 2);
	}

	public static double missingSquaredError(Lifespan real) {
		return Math.pow(real.getBeginYear() - real.getEndYear(), 2) * 2;
	}
}
